<!DOCTYPE HTML>
<html>
<head>

    <meta charset="UTF-8">
    <title>电影详情</title>
    <script src="public/static/js/download/base64.js"></script>
    <!-- 导入 -->
    <script src="public/static/js/download/function1.js"></script>
    <script src="public/static/js/download/function2.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
    <link rel="stylesheet" type="text/css" href="public/static/css/index/detail.css">

    <link href="plugins/paihang/css/lanrenzhijia.css" type="text/css" rel="stylesheet"/>
    <link href="public/static/css/index/index.css?v=${version}" type="text/css" rel="stylesheet"/>
    <link rel="stylesheet" href="public/static/css/base.css"/>
    <link rel="stylesheet" href="plugins/topNav/css/head.css"/>
    <!--BootStrap 框架-->
    <link rel="stylesheet" type="text/css" href="plugins/bootstrap4.0.0/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="plugins/bootstrap4.0.0/css/bootstrap-grid.css">
    <link rel="stylesheet" type="text/css" href="plugins/bootstrap4.0.0/css/bootstrap-reboot.css">

</head>
<script>
    function getQueryVariable(variable) {
        var query = window.location.search.substring(1);
        var vars = query.split("&");
        for (var i = 0; i < vars.length; i++) {
            var pair = vars[i].split("=");
            if (pair[0] === variable) {
                return pair[1];
            }
        }
        return (false);
    }
    const BASE_URL = "http://localhost:8080/smart_movies_war_exploded"
    let detailUrl = BASE_URL + "/detail"
    $(function () {
        let filmId = getQueryVariable("film_id");
        let params = {
            filmId: filmId
        }
        $.get(detailUrl, params, function (result) {
            if (result.status === 200) {
                $("#name1").append().text(result.data.name),
                    $("#name2").append().text(result.data.name),
                    $("#name3").append().text(result.data.name),
                    $("#onDecade").append().text(result.data.onDecade),
                    $("#status").append().text(result.data.status),
                    $("#typeName").append().text(result.data.typeName),
                    $("#actor").append().text(result.data.actor),
                    $("#locName").append().text(result.data.locName),
                    $("#updateTime").append().text(result.data.updateTime),
                    $("#plot").append().text(result.data.plot),
                    $("#plot1").append().text(result.data.plot),
                    $("#subclassname").append().text(result.data.subClassName),
                    $("#typeName1").append().text(result.data.typeName),
                    $("#logid").append().text(result.data.cateLogName),
                    $("#lazy").attr("src", result.data.image),
                    $("#img").attr("src", result.data.image)
            } else {
                alert("网络繁忙!请稍后再试!!!")
            }
        })


    })
</script>

<body>

<div class="container">
    <div class="row">
        <div class="col">
            <!-- 当前位置 -->
            <div class="wz">
                当前位置: <a href="index.html">首页</a>
                &nbsp;&nbsp;»&nbsp;&nbsp;<a href=""><a id="logid"></a></a>
                &nbsp;&nbsp;»&nbsp;&nbsp;<a href="cate.html?sub_Class_id"><a id="subclassname"></a></a>
                &nbsp;&nbsp;»&nbsp;&nbsp;<a href="cate.html?type_id="><a id="typeName1"></a></a>
                &nbsp;&nbsp;»&nbsp;&nbsp;<a id="name2"></a>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-8">
            <div class="row">
                <div class="col-sm-4" style="margin-top: 10px;margin-bottom: 10px;">
                    <div class="pic" >
                        <img class="lazy rounded img-fluids" id="lazy" >
                        <a href="detail.html?film_id=">立即播放</a>
                    </div>
                </div>
                <div class="col-sm-8" style="margin-top: 10px;margin-bottom: 10px;">
                    <div class="info" style="background: #fff;padding: 10px;">
                        <h1 id="name1"></h1>
                        <ul>
                            <li>
                                <span>上映年代：</span>
                                <a id="onDecade"></a>&nbsp;&nbsp;
                                <span>状态：</span>
                                <a id="status"></a>
                            </li>
                            <li>
                                <span>类型：</span>
                                <a href="1.html?type=type_id" target="_blank"><a id="typeName"></a> </a>
                            </li>
                            <li>
                                <span>主演：</span>
                                <a href="javascript:;"><a id="actor"></a> </a>
                            </li>
                            <li>
                                <span>地区：</span>
                                <a id="locName"></a>
                            </li>
                            <li>
                                <span>更新日期：</span>
                                <a id="updateTime"></a>
                            </li>
                            <li>
                                <span>剧情：</span>
                                <a id="plot"></a>
                                <a href="detail.html?film_id=">详细</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col">
                    <div class="updatetps clearfix">更新小提示：度盘： 密码:</div>
                </div>
            </div>
        </div>
    </div>
    <!--间隔-->
    <div class="row" style="background: #dcdfe2;height: 10px;"></div>
    <div class="row">
        <div class="col">
            <div class="endpage clearfix">
                <div class="ulike">
                    <div class="title"><span>猜你喜欢</span></div>
                    <ul class="img-list imglist clearfix">
                        <li>
                            <a class="play-img" href="detail.html?film_id=" title="">
                                <img class="lazy" data-original="image" src="" alt="name" id="img"
                                     data-bd-imgshare-binded="1" style="height:178px; width: 128px; display: block ">
                            </a>
                            <h5>
                                <a href="detail.html?film_id=" title="name" id="name3"></a>
                            </h5>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <!--间隔-->
    <div class="row" style="background: #dcdfe2;height: 10px;"></div>
    <a name="desc"></a>
    <div class="row" style="margin-top: 10px;">
        <div class="col">
            <div class="endtext">
                <div class="title"><span>剧情介绍</span>
                    <p id="plot1"></p>

                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
